package com.heima.controller;

import com.heima.domain.pojo.Permission;
import com.heima.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.heima.domain.pojo.Result;

import java.util.List;

@RestController
@RequestMapping("/permission")
public class PermissionController {

    @Autowired
    private PermissionService permissionService;

    @GetMapping("get_list")
    public Result list(){
        List<Permission> list = permissionService.list();
        return Result.success(list);
    }
}
